package com.aaron.client;

import com.google.gwt.user.client.rpc.IsSerializable;
import java.util.ArrayList;


public class User implements IsSerializable{
	private String name;
	/**
	 * This field is an ArrayList that must always contain Contacts.
	 * 
	 * @gwt.typeArgs <com.aaron.client.Contact>
	 */
	private ArrayList contacts;
	private String auth;
	public User (){
		this.name="";
		this.contacts=new ArrayList();
	}
	public User(String name, ArrayList contacts, String auth){
		this.name=name;
		this.contacts=contacts;
		this.auth=auth;
	}
	public String getName() {
		return this.name;
	}

	public ArrayList getContacts() {
		return this.contacts;
	}
	public String getAuth(){
		return this.auth;
	}

	public Workspace getWorkspace() {
		/*UserServiceAsync userService = (UserServiceAsync) GWT
				.create(UserService.class);
		ServiceDefTarget endpoint = (ServiceDefTarget) userService;
		String moduleRelativeURL = GWT.getModuleBaseURL() + "user";
		endpoint.setServiceEntryPoint(moduleRelativeURL);
		AsyncCallback callback = new AsyncCallback() {
			public void onSuccess(Object result) {
				// do some UI stuff to show success
			}

			public void onFailure(Throwable caught) {
				// do some UI stuff to show failure
			}
		};
		String email = this.getEmail();*/
		return new Workspace();//userService.getWorkspace(email, callback);
	}
}
